<?php
/**
 * 退出
 * Created by PhpStorm.
 * User: zhang-hong
 * Date: 2017/3/6
 * Time: 17:46
 */
class LogoutController extends Yaf_Controller_Abstract
{
    function IndexAction()
    {
        //初始化
        //G('begin');
        $request = $this->getRequest();
        $session_id = $request->getPost("session_id","");
        $shebei_id = $request->getPost("shebei_id","");
        if($session_id == "")
        {
            Utility::apiJsonError(20030, 'session ID不能为空!');

        }else{
            DB::delete("yiyuan_sess")
                ->where("shebei_id","=",$shebei_id)

                ->execute();
            $data["msg"] = "";
            $data["error"] = 200;
            Utility::apiJsonResultExtends($data);
        }

    }
}